// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import '../theme/index.css'
import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import noImg from '@/assets/img/no_image.jpg'
import loadingImg from '@/assets/img/loading_img.jpg'
import echarts from 'echarts'
import 'vue2-animate/dist/vue2-animate.min.css'
import '@/assets/icon/iconfont.css'
import { localUser } from '@/assets/js/local'
import VueLazyLoad from 'vue-lazyload'
import {
  setCookie,
  getCookie,
  delCookie
} from './api/cookie'

Vue.use(VueLazyLoad, {
  error: noImg,
  loading: loadingImg
})

Vue.use(ElementUI)
Vue.config.productionTip = false
Vue.prototype.$http = axios.create({
  baseURL: 'http://120.78.84.174:9090/',
  timeout: 10000
})
Vue.prototype.$cookieStore = {
  setCookie,
  getCookie,
  delCookie
}
Vue.prototype.$localUser = localUser
Vue.prototype.$echarts = echarts

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
